//
//  NetworkTool.swift
//  DHLive
//
//  Created by Mac on 2021/7/7.
//

import UIKit
import Alamofire

let NT = NetworkTool.self

class NetworkTool {
    class func loadUserInfo(urlString: String, method: HTTPMethod = .get, params: [String: Any]? = nil, finished: @escaping (_ result: Any) -> ()) {
        
        let _ = baseUrl + API.loadUserInfo
        
        AF.request(urlString, method: method, parameters: params).responseJSON { response in
            if response.error != nil {
                print("有错", response.error!)
                return
            }
        }
    }
    
    class func test(urlString: String, method: HTTPMethod = .get, params: [String: Any]? = nil, finished: @escaping (_ result: Any) -> ()) {
        
//        let url = baseUrl + API.loadUserInfo
        AF.request(urlString, method: method, parameters: params).responseJSON { response in
            if response.error != nil {
                print("有错", response.error!)
                return
            }
        }
    }
}
